export const redirectQuoteReq = async (protocol, chain, from, to, amount, extra) => {
  const data = await fetch(
    `https://swap-api.defillama.com/dexAggregatorQuote?protocol=${protocol}&chain=${chain}&from=${from}&to=${to}&amount=${amount}`,
    {
      method: "POST",
      body: JSON.stringify(extra),
    }
  ).then((res) => res.json());

  return data;
};

export const sendSwapEvent = async (event) => {
  const data = await fetch(`https://api.llama.fi/storeAggregatorEvent`, {
    method: "POST",
    body: JSON.stringify(event),
  }).then((res) => res.json());

  return data;
};
